/*
 * @Author: 张腾越
 * @Date: 2024-12-20 08:53:46
 * @LastEditors: 张腾越
 * @LastEditTime: 2024-12-30 15:46:46
 * @Description:
 * @FilePath: \vue3_admin_template\src\components\index.ts
 */
import SvgIcon from './SvgIcon/index.vue'
import type { App } from 'vue'
import Category from './Category/index.vue'
import * as ElementPlusIconVue from '@element-plus/icons-vue'
const allGlobalComponent: any = { SvgIcon, Category }
export default {
  install(app: App) {
    Object.keys(allGlobalComponent).forEach((key: string) => {
      app.component(key, allGlobalComponent[key])
    })
    //将element-plus提供图标注册为全局组件
    for (const [key, component] of Object.entries(ElementPlusIconVue)) {
      app.component(key, component)
    }
  },
}
